//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.kw.common.core.exception;



import com.kw.common.core.constant.enums.ResultEnum;
import lombok.NoArgsConstructor;


public class BusinessException extends RuntimeException {
	private Integer code;

	public BusinessException() {
		this(ResultEnum.ERROR);
	}

	public BusinessException(int code, String msg) {
		super(msg);
		this.code = code;
	}

	public BusinessException(String msg) {
		this(ResultEnum.ERROR.getCode(), msg);
	}

	public BusinessException(ResultEnum resultEnum) {
		this(resultEnum.getCode(), resultEnum.getMsg());
	}

	public Integer getCode() {
		return this.code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}
}
